home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 6183 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.3 KB

  1. Path: mail2news.demon.co.uk!genesis.demon.co.uk
  2. From: Lawrence Kirby <fred@genesis.demon.co.uk>
  3. Newsgroups: comp.lang.c
  4. Subject: Re: sscanf bug??????
  5. Date: Thu, 22 Feb 96 23:41:15 GMT
  6. Organization: none
  7. Distribution: world
  8. Message-ID: <825032475snz@genesis.demon.co.uk>
  9. References: <4fimvo$82s@fnord.dfw.net> <10FEB199622213548@erich.triumf.ca> <824160515snz@genesis.demon.co.uk> <4gh6uf$i2@mailhub.scitec.com.au>
  10. Reply-To: fred@genesis.demon.co.uk
  11. X-NNTP-Posting-Host: genesis.demon.co.uk
  12. X-Newsreader: Demon Internet Simple News v1.27
  13. X-Mail2News-Path: genesis.demon.co.uk
  14.  
  15. In article <4gh6uf$i2@mailhub.scitec.com.au>
  16.            ramsesy@rd.scitec.com.au "Ramses Youhana" writes:
  17.  
  18. >You have to be careful when saying that %ld and %d are interchangeable,>
  19. >as a compiler for a 32 bit processor (such as the M68302) may not support the
  20. >"l" in the %ld format.
  21.  
  22. All ANSI conforming compilers are required to support %ld. Converting a long
  23. argument with %d results in undefined behaviour as far as C is concerned
  24. whether it happens to work on your implementation or not. Even if it does
  25. that is not a good reason for using it.
  26.  
  27. -- 
  28. -----------------------------------------
  29. Lawrence Kirby | fred@genesis.demon.co.uk
  30. Wilts, England | 70734.126@compuserve.com
  31. -----------------------------------------
  32.